package com.linkoog.devtools.project_manager.settings.domain;

import lombok.Data;
import org.jetbrains.annotations.NotNull;

import java.util.ArrayList;
import java.util.List;

@Data
public class ProjectDirectory implements Comparable<ProjectDirectory>{

    private String name;
    private String path;
    private List<ProjectInfo> projects;

    public ProjectDirectory() {
    }

    public ProjectDirectory(String name, String path) {
        this.name = name;
        this.path = path;
        projects = new ArrayList<>();
    }

    public ProjectDirectory(String name, String path, List<ProjectInfo> projects) {
        this.name = name;
        this.path = path;
        this.projects = projects;
    }

    @Override
    public int compareTo(@NotNull ProjectDirectory that) {
        return this.path.compareTo(that.path);
    }
}
